package com.wang.service.impl;

import com.wang.dao.BookDao;
import com.wang.dao.impl.BookDaoImpl;
import com.wang.entry.Book;
import com.wang.service.BookService;

import java.util.ArrayList;

public class BookServiceImpl implements BookService {

    BookDao bookDao = new BookDaoImpl();

    @Override
    public ArrayList<Book> selectAll() {
        return bookDao.selectAll();
    }

    @Override
    public ArrayList<Book> selectQuery(Book book) {
        return bookDao.selectQuery(book);
    }

    @Override
    public boolean insertBook(Book book) {
        return bookDao.insertBook(book);
    }

    @Override
    public boolean deleteBookById(int id) {
        return bookDao.deleteBookById(id);
    }

    @Override
    public boolean updateBook(Book book) {
        return bookDao.updateBook(book);
    }

    @Override
    public Book selectById(int id) {
        return bookDao.selectById(id);
    }
}
